import java.util.ArrayList;
import java.util.List;

public class SimpleMenuItem implements MenuItem {
    private String name;
    private double price;

    public SimpleMenuItem(String name, double price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public void add(MenuItem menuItem) {
        throw new UnsupportedOperationException("Cannot add items to a simple menu item.");
    }

    @Override
    public void remove(MenuItem menuItem) {
        throw new UnsupportedOperationException("Cannot remove items from a simple menu item.");
    }

    @Override
    public List<MenuItem> getChildren() {
        return new ArrayList<>();
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public double getPrice() {
        return price;
    }
}